package fun.chutianshu;

public abstract class Pet {
    private String name;
    private int hp;
    static int petNum;

    public static void PrintNumber(){
        System.out.println("当前游戏中共有宠物:"+Pet.petNum);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHp() {
        return hp;
    }

    public void setHp(int hp) {
        this.hp = hp;
    }

    public Pet(String name, int hp) {
        this.name = name;
        this.hp = hp;
        petNum++;
    }
    public Pet(){petNum++;}

    public abstract void Print();

    public abstract void Play();

}
